package de.szut.gui.options;

import de.szut.gui.language.TranslatableMenuCheckBox;

public class OptionsMenuCheckBox extends TranslatableMenuCheckBox implements OptionsComponent {

	private static final long serialVersionUID = -3868737394289173329L;

	private String key;
	
	@Override
	public void setOptionComponentState(String newState) {
		if (newState.equals("1")) {
			setSelected(true);
		} else if (newState.equals("0")) {
			setSelected(false);
		}
	}
	
	@Override
	public String getOptionComponentState() {
		if (isSelected()) {
			return "1";
		}
		return "0";
	}

	@Override
	public String getOptionKey() {
		return key;
	}

	@Override
	public void setOptionKey(String key) {
		this.key = key;
	}



}
